<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>对象查找</title>
  <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    <div id="div1">div1</div>
	<span class="box">class为box的span</span>
	<ul>
	  <span>span文本1</span>
	  <li>AAAAA</li>
	  <li title="hello" class="box2">BBBBB</li>
	  <li class="box" id="cc">CCCCC</li>
	  <li title="hello">DDDDD</li>
	  <li title="two"><span>span文本2</span></li>
	  <span>span文本3</span>
	</ul>
	<span>span文本4</span>
 </body>
 <script>
    //$("ul").children("span:eq(1)").css({"color":"red"});
	//$("ul").children("span").first().css({"color":"red"});
    //$("ul").find("span:eq(1)").css({"color":"red"});
	//$("ul").parent().css({"color":"red"});
	$("ul").parent().parent().css({"background-color":"yellow"});
    $("#cc").prevAll("li").css({"color":"black"});
	$("#cc").siblings("li").andSelf().css({"color":"black"});
 </script>
</html>
